Skip to content

feat: Add bigframes.pandas.col with basic operators#2405

Open
TrevorBergeron wants to merge 4 commits intomainfrom
pd_expressions
Open

feat: Add bigframes.pandas.col with basic operators#2405
TrevorBergeron wants to merge 4 commits intomainfrom
pd_expressions

Conversation

@TrevorBergeron
Copy link
Contributor

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> 🦕

@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. labels Jan 23, 2026
@product-auto-label product-auto-label bot added size: l Pull request size is large. and removed size: m Pull request size is medium. labels Feb 5, 2026
@TrevorBergeron TrevorBergeron marked this pull request as ready for review February 5, 2026 01:24
@TrevorBergeron TrevorBergeron requested review from a team as code owners February 5, 2026 01:24
@TrevorBergeron TrevorBergeron requested a review from tswast February 5, 2026 01:24
@product-auto-label product-auto-label bot added size: m Pull request size is medium. and removed size: l Pull request size is large. labels Feb 5, 2026
@TrevorBergeron TrevorBergeron requested review from sycai and removed request for tswast February 5, 2026 18:27
"new_col_1": 4 - pd.col("int64_col"), # type: ignore
"new_col_2": pd.col("int64_col") / (pd.col("float64_col") * 0.5), # type: ignore
}
df = scalars_df.assign(**bf_kwargs)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style nit: an empty line above to separate "arrange" and "act" block

import bigframes.operations as bf_ops


# Not to be confused with internal Expressions class
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit:

... confused with internal Expression class

=>

... confused with the Expression class under bigframes.core

assert_frame_equal(bf_result, pd_result)


def test_assign_using_pd_col(scalars_dfs):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

non-rhetorical question: what's your thought on providing full test coverage for all the operators you have introduced in this change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants